package com.gomtel.smartdevice.ui.view;

import android.content.Context;
import android.support.annotation.Nullable;
import android.support.v4.widget.DrawerLayout;
import android.util.AttributeSet;

/**
 * Created by Administrator on 2018/7/29 0029.
 */

public class AutoDrawerLayout extends DrawerLayout {
    public AutoDrawerLayout(Context context) {
        super(context);
    }

    public AutoDrawerLayout(Context context, @Nullable AttributeSet attrs) {
        super(context, attrs);
    }

    public AutoDrawerLayout(Context context, @Nullable AttributeSet attrs, int defStyle) {
        super(context, attrs, defStyle);
    }

    @Override
    protected void onMeasure(int widthSpec, int heightSpec) {
        widthSpec = MeasureSpec.makeMeasureSpec(
                MeasureSpec.getSize(widthSpec), MeasureSpec.EXACTLY);
        heightSpec = MeasureSpec.makeMeasureSpec(
                MeasureSpec.getSize(heightSpec), MeasureSpec.EXACTLY);
        super.onMeasure(widthSpec, heightSpec);
    }


}
